package com.webmagic.demo.mv;

import us.codecraft.webmagic.Spider;

/**
 * @description
 * @Auther zhanglu
 * @Date 2018/4/17 上午1:28
 */
public class Start {
    public static void main(String[] args) {
        //阳光电影爬虫 http://www.ygdy8.com
        Spider spider =  Spider.create(new MvProcessor());
        spider.addUrl("http://www.instrument.com.cn/zc/1.html")
                .addPipeline(new SpiderService())
                .thread(2)
                .run();

        //抓取结束
        if (Spider.Status.Stopped.equals(spider.getStatus())){
            System.out.println("end!!!!!!!!!!!!");
        }
    }
}
